package aop.aspectj.AspectJExpressionPointcutAdvisor;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import example.samples.ArithmeticCalculator;


public class Main {
	public static void main(String[] args) {
		ApplicationContext springContext = new ClassPathXmlApplicationContext("aop/aspectj/AspectJExpressionPointcutAdvisor/aspectjexpressionpointcutadvisor.xml");
		
		ArithmeticCalculator arithmeticCalculator = (ArithmeticCalculator) springContext.getBean("arithmeticCalculator");
		
		arithmeticCalculator.add(1.0, 2.0);
		
		arithmeticCalculator.sub(3, 4);
		
		arithmeticCalculator.mul(5, 6);
		
		arithmeticCalculator.div(7, 0);
	}
}
